Fix deadlock when accessing IO memory.
authorSteven Hand <steven@xensource.com>
Thu, 14 Dec 2006 12:35:23 +0000 (12:35 +0000)
committerSteven Hand <steven@xensource.com>
Thu, 14 Dec 2006 12:35:23 +0000 (12:35 +0000)
Signed-off-by: Steven Hand <steven@xensource.com>
tools/ioemu/target-i386-dm/exec-dm.c

index 08911564a19a0f1c15d6fbc52adbe29f6f5f3c78..e27ecbc3a4a4e4d28bfad356f7d26b620d7de82c 100644 (file)
@@ -441,7 +441,7 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
     uint32_t val;
 
 #if defined(__i386__) || defined(__x86_64__)
-    static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+    static pthread_mutex_t mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
     pthread_mutex_lock(&mutex);
 #endif